package com.jz.yanshe.ui.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import com.youth.banner.Banner;

/**
 * Created by Administrator on 2018/5/18.
 */

public class MyBanner extends Banner {
    private boolean isCanScroll = false;

    public MyBanner(Context context) {
        super(context);
    }

    public MyBanner(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyBanner(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public void setScanScroll(boolean isCanScroll) {
        this.isCanScroll = isCanScroll;
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        return isCanScroll;
    }

    @Override
    public boolean onTouchEvent(MotionEvent ev) {
            return super.onTouchEvent(ev);
    }


}
